;(function(root, factory){
	if (typeof exports === "object") {
        // CommonJS
        module.exports = exports = factory();
    }
    else if (typeof define === "function" && define.amd) {
        // AMD
        define([], factory);
    }
    else {
        // Global (browser)
        root.Util = factory();
    }
})(this, function(){
	var util = {};
	util.isNull = function( o ){
    	return o === undefined || o === null;
	}
	util.getOrDefault = function( o, defaultVal ){
        return util.isNull(o) ? defaultVal : o;
	}
	util.isEmpty = function( o ){
		if (util.isNull(o)) {
			return true;
		}
		if (!util.isNull(o.isEmpty())) {
			return o.isEmpty();
		}
		if (!util.isNull(o.length())) {
			return o.length() === 0;
		}
		if (!util.isNull(o.length)) {
			return o.length === 0;
		}
		throw "unsupported method isEmpty";		
	}
	return util;
})